﻿$win = "디아블로 III"

HotKeySet("{SPACE}", "Toggle")
HotKeySet(",", "Chat")
HotKeySet(".", "Stop")

;-------------------------------------------------------------------------
Opt("PixelCoordMode", 0)
Opt("MouseCoordMode", 0)


Global $pause = True
Global $chat = False

While True
   Sleep(200)

   If ($pause = True) Then
	  ContinueLoop
   EndIf
   Send('1')
   Send('2')
   Send('3')
   Send('4')
   Sleep(200)
   Send('2')
   Send('3')
   Send('4')
   Sleep(200)
   Send('2')
   Send('3')
   Send('4')
WEnd

Func Toggle()
   If $chat = True Then
	  HotKeySet("{SPACE}")
	  Send("{SPACE}")
	  HotKeySet("{SPACE}", "Toggle")
	  Return
   EndIf

   If $pause = True Then
	  $pause = False
   Else
	  $pause = True
	  Send("{SHIFTDOWN}")
	  MouseClick("LEFT")
	  Send("{SHIFTUP}")
   EndIf
EndFunc

Func Chat()
   If $chat = True Then
	  $chat = False
   Else
	  $chat = True
	  $pause = True
   EndIf
EndFunc

Func Stop()
   Exit
EndFunc
